<%@page import="com.cms.SS"%>
<%@page import="com.cms.persist.DaoFactory"%>
<%@page import="com.cms.persist.Dao"%>
<%@page import="com.cms.Utils"%>
<%@page import="com.cms.persist.DaoHelper"%>
<%@page import="javax.jdo.PersistenceManager"%>
<%@page import="com.cms.persist.PMF"%>
<%@ page language="Java"%>
<%@ page contentType="text/html; charset=UTF8"%> 
<%@ page import="java.util.List" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%@ page import="com.cms.model.Page" %>

<div id="content">
	<%
		Dao dao = DaoFactory.getDao();
		String pageId = request.getParameter(SS.PARAM_PAGE_ID);
		if (pageId == null) 
		{
			pageContext.forward("/index.jsp?pageId=0");
		}
		else
		{
			Page p = dao.getPageById(Long.parseLong(pageId));
			%>
				<%=p.getContent() %>
			<%
		}
	%>
</div>